package com.ch.home.bean;

import java.util.Arrays;

/**
 * 菜品
 * Created by CHEN on 2019/8/24.
 * OK
 */
public class Dish {

    private Integer dishId;
    private String dishName;
    private String dishDescription;//菜品描述、介绍等
    private Integer dishRank;//推荐等级
    private String dishTag;//标签
    private Integer likeNum;//点赞数

    public Dish() {
    }

    public Dish(Integer dishId, String dishName, String dishDescription, Integer dishRank, String dishTag, Integer likeNum) {
        this.dishId = dishId;
        this.dishName = dishName;
        this.dishDescription = dishDescription;
        this.dishRank = dishRank;
        this.dishTag = dishTag;
        this.likeNum = likeNum;
    }

    public Integer getDishId() {

        return dishId;
    }

    public void setDishId(Integer dishId) {
        this.dishId = dishId;
    }

    public String getDishName() {
        return dishName;
    }

    public void setDishName(String dishName) {
        this.dishName = dishName;
    }

    public String getDishDescription() {
        return dishDescription;
    }

    public void setDishDescription(String dishDescription) {
        this.dishDescription = dishDescription;
    }

    public Integer getDishRank() {
        return dishRank;
    }

    public void setDishRank(Integer dishRank) {
        this.dishRank = dishRank;
    }

    public String getDishTag() {
        return dishTag;
    }

    public void setDishTag(String dishTag) {
        this.dishTag = dishTag;
    }

    public Integer getLikeNum() {
        return likeNum;
    }

    public void setLikeNum(Integer likeNum) {
        this.likeNum = likeNum;
    }

    @Override
    public boolean equals(Object o) {

        if (this == o) return true;
        if (o == null || getClass( ) != o.getClass( )) return false;

        Dish dish = (Dish) o;

        if (dishId != null ? !dishId.equals(dish.dishId) : dish.dishId != null) return false;
        if (dishName != null ? !dishName.equals(dish.dishName) : dish.dishName != null) return false;
        if (dishDescription != null ? !dishDescription.equals(dish.dishDescription) : dish.dishDescription != null)
            return false;
        if (dishRank != null ? !dishRank.equals(dish.dishRank) : dish.dishRank != null) return false;
        if (dishTag != null ? !dishTag.equals(dish.dishTag) : dish.dishTag != null) return false;
        return likeNum != null ? likeNum.equals(dish.likeNum) : dish.likeNum == null;
    }

    @Override
    public int hashCode() {
        int result = dishId != null ? dishId.hashCode( ) : 0;
        result = 31 * result + (dishName != null ? dishName.hashCode( ) : 0);
        result = 31 * result + (dishDescription != null ? dishDescription.hashCode( ) : 0);
        result = 31 * result + (dishRank != null ? dishRank.hashCode( ) : 0);
        result = 31 * result + (dishTag != null ? dishTag.hashCode( ) : 0);
        result = 31 * result + (likeNum != null ? likeNum.hashCode( ) : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Dish{" +
                "dishId=" + dishId +
                ", dishName='" + dishName + '\'' +
                ", dishDescription='" + dishDescription + '\'' +
                ", dishRank=" + dishRank +
                ", dishTag='" + dishTag + '\'' +
                ", likeNum=" + likeNum +
                '}';
    }
}
